#ifndef __BUBBLE_TOUCH_LAYER_H__
#define __BUBBLE_TOUCH_LAYER_H__

#include "cocos2d.h"
#include "SimpleAudioEngine.h"
#include "utility/socket/websocket/WebSocketClient.h"

using namespace cocos2d;
using namespace CocosDenshion;
using namespace std;

class BubbleTouchLayer :public cocos2d::Layer
{
public:
	virtual bool init();
	CREATE_FUNC(BubbleTouchLayer);
	~BubbleTouchLayer();
private:
	virtual bool onTouchBegan(Touch *touch, Event *event) override;
	virtual void onTouchEnded(Touch *touch, Event *event) override;

	void bubbleUpdate(float dt);
	void bubbleMoveUpdate(float dt);
	bool verdictClickDomain(CCTouch *pTouch, CCSprite *obj);
private:
	Size visibleSize;
	Point visibleOrigin;

	CCArray* m_pBubbleSprites;
	Animation* m_pCrashAnimation;
};
#endif //__BUBBLE_TOUCH_LAYER_H__